<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class UserIntegralLogResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        $data = [
            "id"         => $this->id,
            "updated_at" => $this->updated_at->toDateTimeString(),
            "created_at" => $this->created_at->toDateTimeString(),
            "integral"   => $this->integral,
            "des"        => $this->des,
        ];
        return  $data;
//        return parent::toArray($data);
    }
}
